-- GENERATED SPELL FOR [Plague Walker] --


function spell0_30283(pUnit, Event) --@Aura of Lost Hope,Self--
pUnit:FullCastSpellOnTarget(56709,pUnit)
pUnit:RegisterEvent('Sorts_30283', 0, 1)
end

function spell1_30283(pUnit, Event) --@Aura of Lost Hope,Self--
pUnit:FullCastSpellOnTarget(61459,pUnit)
pUnit:RegisterEvent('Sorts_30283', 0, 1)
end

function spell2_30283(pUnit, Event) --@Contagion of Rot,n/a--
pUnit:FullCastSpellOnTarget(56707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30283', 586, 1)
end

function Sorts_30283(pUnit, Event)
local choix_sorts_30283 = math.random(0, 2)
if choix_sorts_30283 == 0 then
pUnit:RegisterEvent('spell0_30283', 1, 1)
end
if choix_sorts_30283 == 1 then
pUnit:RegisterEvent('spell1_30283', 1, 1)
end
if choix_sorts_30283 == 2 then
pUnit:RegisterEvent('spell2_30283', 1, 1)
end
end

function mob30283_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30283', math.random(1500, 3000), 1)
end

function mob30283_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30283_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30283_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30283, 1, 'mob30283_Action')
RegisterUnitEvent(30283, 2, 'mob30283_Leave')
RegisterUnitEvent(30283, 3, 'mob30283_Kill')
RegisterUnitEvent(30283, 4, 'mob30283_Die')
